#ifndef __HUMBLE_GL_CONTEXT_H__ 
#define  __HUMBLE_GL_CONTEXT_H__
#include "Core/humble_context.h"

// System Headers.
#include <windows.h>
#include <GL/gl.h>			// Header File For The OpenGL32 Library
#include <GL/glext.h>
#include <GL/wglext.h>
//#include <gl\glu.h>			// Header File For The GLu32 Library
//#include <gl\glaux.h>		// Header File For The Glaux Library

class Win32_GL_Video_Context : public  Humble_Video_Context
{
    public:
        Win32_GL_Video_Context();
        ~Win32_GL_Video_Context();
        bool initialize();
        bool createWindow();
        bool destroyWindow();
        bool setResolution(int height, int width);
        bool setFullScreen(bool fullscreen);
        bool isFullscreen();
        void setWindowName(size_t s_name, char *name);
        void flipPages();
		char* GetRenderer();
		LRESULT	CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);	// Declaration For WndProc		
    private:
	
		// Extensions that are in use
		PFNWGLCREATECONTEXTATTRIBSARBPROC m_wglCreateContextAttribsARB;
		
		bool  CreateGL2_Context();
		bool  CreateGL3_Context();
		void PrepExtensionList();
		bool isExtensionSupported( const char*);
        void setWindowGroup(size_t s_name, char *name);
        char *glxExts;
        bool m_ErrorOccurred;
		bool m_IsGL30Context;
		bool m_IsGL40Context;	
		bool m_isGL_Initialized;
		bool m_Active;
		int OpenGLVersion[2];
		int m_WindowPosX;
		int m_WindowPosY;
		// Windows Interface Data:
		HDC			m_hDC;		// Private GDI Device Context
		HGLRC		m_hRC;		// Permanent Rendering Context
		HWND		m_hWnd;		// Holds Our Window Handle
		HINSTANCE	m_hInstance;		// Holds The Instance Of The Application
		WNDCLASS	m_WindowClass;		// Details of Window
		RECT		m_WindowRect;		    // Rectangle Information of Window
		TCHAR szWindowName[50];
		TCHAR szClassName[50];
		char *GLVersionString;
		
		int m_TotalGLExtensions; // Tracks Total extensions.
};

#endif

